## Download template
pid file = /var/run/rsyncd.pid
syslog facility = daemon
max connections = 20
timeout = 2400
use chroot = yes
uid = nobody
gid = nobody
#transfer logging = false
motd file = /etc/motd_fedora
log file = /var/log/rsyncd-fedora.log

dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.bz2 *.iso *.ogg *.ogv *.tbz
exclude = .snapshot/ .~tmp~/ /.private/ /.private/** **/.nfs*
ignore nonreadable = yes
list = true
read only = yes
refuse options = checksum

[ fedora-alt ]
        comment = non-Fedora Alternative Content
        path = /srv/pub/alt
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[fedora-archive]
        comment = Fedora Release Archives
        path = /srv/pub/archive
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}
     
[ fedora-enchilada ]
        comment = Fedora - The whole enchilada
        path = /srv/pub/fedora
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[ fedora-buffet ]
        comment = Fedora - The whole buffet. All you can eat.
        path = /srv/pub
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[ fedora-epel ]
        comment = Extra Packages for Enterprise Linux
        path = /srv/pub/epel
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[ fedora-linux-releases ]
        comment = Fedora Linux Releases
        path = /srv/pub/fedora/linux/releases
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[ fedora-linux-development ]
        comment = Fedora Linux Development
        path = /srv/pub/fedora/linux/development
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[ fedora-linux-updates ]
        comment = Fedora Linux Updates
        path = /srv/pub/fedora/linux/updates
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[fedora-secondary]
        comment = Fedora Secondary Archs
        path = /srv/pub/fedora-secondary
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[ fedora-stage ]
        comment = Staging directory
	path = /srv/pub/alt/stage/
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[ fedora-live-respins ]
	comment = Fedora Live Respins
	path = /srv/pub/alt/live-respins
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}

[ fedora-eln ]
	comment = Fedora ELN composes
	path = /./mnt/odcs
	{% if inventory_hostname in groups['download_tier1'] %}
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}
        {% endif %}
##
## The following are not seen and are limited by IP.
##
## All entries should be hostnames that resolve to the reverse dns not ips

[fedora-enchilada0]
       comment = Fedora Enchilada for Tier0|1 Mirrors
       path = /srv/pub/fedora/
       list = no
       uid = nobody
       gid = 263
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}

[fedora-buffet0]
       comment = Fedora Buffet for Tier0|1 Mirrors
       path = /srv/pub/
       list = no
       uid = nobody
       gid = 263
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}

[fedora-epel0]
       comment = Fedora EPEL for Tier0|1 Mirrors
       path = /srv/pub/epel/
       list = no
       uid = nobody
       gid = 263
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}

[fedora-alt0]
       comment = Fedora ALT for Tier0|1 Mirrors
       path = /srv/pub/alt/
       list = no
       uid = nobody
       gid = 263
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}

[fedora-archive0]
       comment = Fedora Archive for Tier0|1 Mirrors
       path = /srv/pub/archive/
       list = no
       uid = nobody
       gid = 263
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}

[fedora-secondary0]
       comment = Fedora Secondary Archs
       path = /srv/pub/fedora-secondary
       list = no
       uid = nobody
       gid = 263
       hosts allow = {% for host in vars['dl_tier1'] %}{{host}},{% endfor %}

{% if datacenter == 'iad2' %}
[fedora-compose0]
       comment = Fedora composes
       path = /mnt/koji/compose
       list = no
       uid = nobody
       gid = nobody
       hosts allow = 10.0.0.0/8
{% endif %}

{% if datacenter == 'rdu-cc' %}
# For RDU-CC usage
[centos]
       comment = CentOS Mirror
       path = /srv/pub/centos
       list = yes

# For RDU-CC usage
[centos-altarch]
       comment = CentOS Mirror Altarch
       path = /srv/pub/centos-altarch
       list = yes

# For RDU-CC usage
[centos-stream]
       comment = CentOS Mirror Stream9
       path = /srv/pub/centos-stream
       list = yes
{% endif %}


# For distributing applications
[log]
       comment = Server Logs
       path = /var/log
       uid = root
       gid = root
       read only = yes
       hosts allow = 10.3.163.39
       list = no
